package com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifest;

import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcargo.ManifestCargoCreateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestcntr.ManifestCntrCreateReqVO;
import com.cmc.cloud.cmclink.doc.api.document.rep.manifestrep.manifestscn.ManifestScnCreateReqVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

/**
 * 舱单创建 Request VO
 *
 * @author chenzheng
 */
@Schema(description = "管理后台 - 舱单创建 Request VO")
@Data
@ToString(callSuper = true)
public class ManifestSlaveAllCreateReqVO {

    @Schema(description = "订舱id", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{manifest.bookingno.notblank}")
    @Length(max = 20, message = "{manifest.bookingno.length}")
    private Long soId;

    @Schema(description = "货物信息")
    @NotEmpty(message = "{manifest.manifestCargoList.notblank}")
    private List<ManifestCargoCreateReqVO> manifestCargoList;

    @Schema(description = "箱信息")
    @NotEmpty(message = "{manifest.manifestCntrList.notblank}")
    private List<ManifestCntrCreateReqVO> manifestCntrList;

    @Schema(description = "相关方")
    @NotEmpty(message = "{manifest.manifestScnList.notblank}")
    private List<ManifestScnCreateReqVO> manifestScnList;

}
